#ifndef ESVIDEO_H
#define ESVIDEO_H

#ifdef __cplusplus
extern "C"{
#endif

    void* H264enc_open(int nWidth,int nHeight,int nFrmRate,int nQuant,int nBitrate,int nQMin,int nQMax, int iThread);
    void H264enc_close(void* pHandle);
    int H264enc_encode(void* pHandle, unsigned char *pYV12[],unsigned char* pStreamBuf,int nBufLen,int* pbKeyFrame);
    void* H264enc_open_screen(int nWidth,int nHeight,int nSlice);

/**
  *
  * Decode
  *
  */

    typedef	struct H264Frame
    {
        unsigned char *yuv[3];
        int width;
        int height;
        int pitch[3];
        int key_frame;
    }H264Frame;


    void *H264dec_open(void );
    void H264dec_close(void *pH264dec);
    int H264dec_decode(void *pH264dec, int *pGotPic, unsigned char *pBsBuf, int nBsSize, H264Frame *frame);



#ifdef __cplusplus
}
#endif

#endif // ESVIDEO_H
